home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / comm / ca29_3.zip / VT100.CMD < prev    next >
OS/2 REXX Batch file  |  1992-09-24  |  2KB  |  59 lines

  1.     SET TTHRU OFF
  2.     LEGEND "Installing VT100 emulation"
  3. ;
  4. ; ----- Set an emulation, enabling both display and remap
  5. ;    commenced: 9/23/92 R.McG
  6. ; ----------------------------------------------------------------
  7. ;    Note: This script creates the file COM-AND.RMP on the default
  8. ;    subdirectory (if no COM-AND= subdir) or on the COM-AND= subdir.
  9. ;    An existing COM-AND.RMP is destroyed.
  10. ; ----------------------------------------------------------------
  11. ;
  12. ;    If COM-AND.RMP is on the current subdirectory, use it
  13. ;
  14.     S0 = "COM-AND.RMP"        ; Default to current subdir
  15.     IF ISFILE S0 GOTO WriteRMP    ; Skip if on current subdir
  16. ;
  17. ;    Construct the file name with the COM-AND= pathing (if provided)
  18. ;
  19.     ENVIRON S1 "COM-AND="        ; Look for COM-AND= environment var
  20.     IF FOUND            ; If environment variable found
  21.        S1 = S1&""            ; Trim trailing blanks
  22.        LENGTH S1 N0            ; Get its length
  23.        IF N0 GT 0            ; If trimmed len > 0
  24.           IF NOT STRCMP S1(n0-1:n0-1) "\" S1 = S1&"\"
  25.        ELSE
  26.           S1 = ""
  27.           ENDIF
  28.        S0 = S1&S0            ; Concatenate path and name
  29.        ENDIF
  30. ;
  31. ;    Open the output file and write the remap
  32. ;
  33. WriteRMP:
  34.     FOPENO S0 text            ; Open the output file
  35.     IF FAILED            ; Catch open error
  36.        MESS "Cannot open "*S0
  37.        EXIT
  38.        ENDIF
  39.     WRITE "^@S^A^@H^C^[[A^@P^C^[[B^@K^C^[[D^@M^C"
  40.     WRITE "^[[C^@G^C^[[H^@O^C^[[K^@v^G^[[H^[[ J^@"
  41.     WRITE "ä^C^[[M^@w^C^[[L^@h^C^[Oq^@i^C^[Or^@j^C"
  42.     WRITE "^[Os^@k^C^[Ot^@l^C^[Ou^@m^C^[Ov^@n^C^["
  43.     WRITE "Ow^@o^C^[Ox^@p^C^[Oy^@q^C^[Op^@g^B^@q^@"
  44.     WRITE "T^C^[OP^@U^C^[OQ^@V^C^[OS^@W^C^[OT^@X^C"
  45.     WRITE "^[Om^@Y^C^[Ol^@Z^C^[OM^@[^C^[On"
  46. ;
  47. ;    Add a remap for F10 (help) if help script is installed
  48. ;
  49.     IF ISSC "VT100.HLP"
  50.        WRITE "^@D^K VT100.HLP^M^@^@"; The " " is char value 255
  51.        ENDIF
  52.     FCLOSEO                ; Close the file
  53. ;
  54. ; ----- Enable display emulation and remap
  55. ;
  56.     EMULATE VT100            ; Display emulation
  57.     SET REMAP ON            ; Load new remap file
  58.     EXIT
  59.